package com.coolwen.dao;

import com.coolwen.entity.Challenge;

import java.util.List;
import java.util.Map;

public interface ChallengeMapper {
    int deleteByPrimaryKey(Integer challengeId);

    int insert(Challenge record);

    int insertSelective(Challenge record);

    Challenge selectByPrimaryKey(Integer challengeId);

    int updateByPrimaryKeySelective(Challenge record);

    int updateByPrimaryKey(Challenge record);

    int updateIsConfrimById(Integer integer);

    int updateAgree(Integer challengeId);

    int updateAgreeAndConfrim(Integer challengeId);

    int updateAgainst(Integer challengeId);

    int updateEnd(Integer challengeId);

    int updateEndAndPresent(Integer challengeId);

    int updateRefuse(Integer challengeId);

    int updateResult(Map<String, Object> params);

    /**
     * 通过状态码和teamId来获取约战记录
     * @param params
     * @return
     */

    List<Challenge> selectByConfirmState(Map<String, Object> params);

    /**
     * 通过ReceiveId和状态码来获取约战记录信息
     * @param params
     * @return
     */

    List<Challenge> selectReceiveId(Map<String, Object> params);

    /**
     * 通过sendId来获取数据
     * @param teamId
     * @return
     */

    List<Challenge> selectSendId(Integer teamId);

    /**
     * 通过同意状态码来获取数据
     * @param ConfirmState
     * @return
     */

    List<Challenge> selectByAgreeState(Integer ConfirmState);


	}